"""
@-*- coding: utf-8 -*-
@ python: 3.12.3
@ 创建者: JacksonCode
@ 创建时间: 2025/7/19
"""
import pandas as pd
from datetime import datetime, timedelta

# 设定起始日期
start_date = datetime(2024, 7, 20)  # 可根据实际修改

# 剑桥雅思册数及对应计划周期（每册14天）
book_plan = [
    ("剑6", 14),
    ("剑7", 14),
    ("剑8", 14),
    ("剑9", 14),
    ("剑10", 14),
    ("剑11", 14),
    ("剑12", 14),
    ("剑13", 14),
    ("剑14", 14),
    ("剑15", 7),
    ("剑16", 7),
    ("剑17", 7),
    ("剑18", 7),
    ("剑19", 7),
]

# 生成日期和计划表
dates = []
books = []
test_numbers = []
for book, days in book_plan:
    tests = 4  # 每册有4套测试
    days_per_test = days // tests
    for test in range(1, tests + 1):
        for day_offset in range(days_per_test):
            dates.append(start_date)
            books.append(book)
            test_numbers.append(f"Test {test}")
            start_date += timedelta(days=1)

# 创建DataFrame
df = pd.DataFrame({
    "日期": dates,
    "剑桥册数": books,
    "Test 编号": test_numbers,
    "正确率": "",
    "错题题型": "",
    "错因分析": "",
    "生词短语": ""
})

# 保存为Excel
output_path = "./IELTS_Cambridge_Reading_Study_Plan.xlsx"
df.to_excel(output_path, index=False)
print(f"计划表已保存至: {output_path}")
